import Mock from 'mockjs'

export default ({
  mock
}) => {
  if (!mock) return
  Mock.mock('/api/search/hot', 'get', {
    code: 0,
    data: [
      '红楼梦',
      '故宫日历',
      '人民文学',
      '唐宋词鉴赏辞典',
      '邮票',
      '考研数学',
      '刘慈欣',
      '西游记',
      '油印',
      '战国策'
    ],
    msg: ''
  })
  Mock.mock(/\/api\/search[\s\S]*?/, 'get', {
    code: 0,
    data: [],
    msg: 'success'
  })
}
